#{extends 'frame.html' /}
#{set title:'资金管理' /}

#{set 'moreStyles'}
<link rel="stylesheet" media="screen" href="@{'/public/stylesheets/admin/timeout.css'}" />
<link rel="stylesheet" media="screen" href="@{'/public/stylesheets/jquery.pagination.css'}" />
<link rel="stylesheet" media="screen" href="@{'/public/stylesheets/datePicker.css'}" />
#{/set}
<div class="contentCard">
	<div class="contentTitle">
		<span class="iconfont">&#xf00bf;</span>
		任务列表
	</div>
	<div id="taskFilterPanel">
		<div class="clearfix mb10">
			<span class="floatLeft mr10">平台</span>
			<select class="floatLeft mr10 lh" id="platform">
				<option value="">全部</option>
				#{list items:platforms, as:'p'}
				<option value="${p}">${p.title}</option>
				#{/list}
			</select>
			<span class="floatLeft mr10">终端</span>
			<select class="floatLeft mr10" id="device">
				<option value="">全部</option>
				#{list items:devices, as:'d'}
				<option value="${d}">${d.title}</option>
				#{/list}
			</select>
			<span class="floatLeft mr10">状态</span>
			<select class="floatLeft mr10" id="status">
				<option value="">全部</option>
				#{list items:taskStatus	, as:'s'}
				<option value="${s}">${s.title}</option>
				#{/list}
			</select>
			<!-- <span class="floatLeft mr10">买手昵称</span>
			<input type="text" id="buyerNick" class="floatLeft mr10 inputText" /> -->
			<span class="floatLeft mr10">买手旺旺</span>
			<input type="text" id="buyerAccount" class="floatLeft mr10 inputText" />
		</div>
		<div class="clearfix mb10">
			<span class="floatLeft mr10">买手账号</span>
			<input type="text" id="buyerNick" class="floatLeft mr10 inputText" />
			<span class="floatLeft mr10">商家昵称</span>
			<input type="text" id="sellerNick" class="floatLeft mr10 inputText" />
			<span class="floatLeft mr10">店铺名称</span>
			<input type="text" id="shopName" class="floatLeft mr10 inputText" />
		</div>
		<div class="clearfix mb10">
			<span class="floatLeft mr10">订单ID</span>
			<input type="text" id="orderId" class="floatLeft mr10 inputText" />
			<span class="floatLeft mr10" title="比较长的任务编号">商家任务ID</span>
			<input type="text" id="taskId" class="floatLeft mr10 inputText" />
			<span class="floatLeft mr10" title="下面列表中的ID字段">买手任务ID</span>
			<input type="text" id="buyerTaskId" class="floatLeft mr10 inputText" />
		</div>
		<div class="clearfix">
			<div class="clearfix mb10">
				<div class="cal-content">
					<span class="floatLeft mr10">修改时间</span>
					<span class="floatLeft mr10 cal-date-input">
						<input class="inputDate start-date" id="modifyTimeStart" readonly="readonly" value=""  />
					</span>
					<span class="floatLeft mr10 med-cal-split">-</span>
					<span class="floatLeft mr10 cal-date-input">
						<input class="inputDate end-date" id="modifyTimeEnd" readonly="readonly" value="" />
					</span>
				</div>					
			</div>
		</div>
	</div>
	<div class="warnBox">
		<span class="iconfont">&#xf00b7;</span>
		注意
		<br/>
		1、商家发货超时：快递打印成功后2天。【需要核实淘宝是否发货】
		<br/>
		2、商家退款超时：买手确认收货后2天。【重点处理，每天处理，公告后扣5元】
		<br/>
		3、商家核实退款金额超时：买手确认收货后2天。【重点处理，每天处理，公告后扣5元】
		<br/>
		4、买手收货超时：商家发货后7天。【需要核实快递信息是否有误】
		<br/>
		5、买手确认退款超时：商家返款后2天。【需要核实需要核实买手财付通是否收到】
		<br/>
		6、买手核实退款金额超时：商家返款后2天（平台返款）。【需要核实】
	</div>
	
	<div class="">
	
		<div class="clearfix">
			<a class="checkTextBtn selectedCtb " href="javascript:;" type="sllerGood">商家发货超时</a>
			<a class="checkTextBtn " href="javascript:;" type="sellerRefund">商家退款超时</a>
			<a class="checkTextBtn " href="javascript:;" type="sellerRefundPlat">商家退款超时（平台）</a>
		</div>
		<div class="clearfix">
			<a class="checkTextBtn " href="javascript:;" type="buyerGood">买手收货超时</a>
			<a class="checkTextBtn " href="javascript:;" type="buyerRefund">买手确认退款超时</a>
			<a class="checkTextBtn " href="javascript:;" type="buyerRefundPlat">买手确认退款超时（平台）</a>
		</div>
		<div class="foundRecordWrapper" style="overflow: hidden;" id="taskContainer"></div>
		<!--这里是分页区域-->
		<div class="popWrapper" style="display: none;" id="tr_loading_mask">
			<div class="maskLayer"></div>
			<img class="tr_juhua" src="@{'/public/images/pre_loading.gif'}" />
		</div>
		<div class="pagin-btm clearFix">
			<div class="pagination"></div>
		</div>

	</div>
</div>
<textarea id="recordTemp" class="muban">
	<table class="normTable">
		<thead>				
			<tr>
				<td style="width:5%">ID</td>
				<td style="width:10%">商家任务ID</td>
				<td style="width:20%">商品信息</td>
				<td style="width:8%" title="买手旺旺ID">买号</td>
					
				<td style="width:10%">订单ID</td>
				<td style="width:6%">垫付资金</td>
				<td style="width:6%">佣金</td>


				<td style="width:10%">店铺</td>
				<td style="width:8%">卖家昵称</td>
				<!-- <td style="width:9%">接手时间</td> -->
				<td style="width:12%">修改时间</td>
				<td style="width:15%">状态</td>
				<td style="width:15%">订单截图</td>
				<td style="width:15%">操作</td>
			</tr>
		</thead>
		
		<tbody>
			{{#results}}
			<tr>
				<td title="点击查看买手任务详情">
					{{#isPC}}
					<i class="iconfont">&#xf0099;</i>
					{{/isPC}}
					{{^isPC}}
					<i class="iconfont">&#xf00a2;</i>
					{{/isPC}}
					<a target="_blank" href="/admin/buyerTask/{{id}}" class="view-detail">{{id}}</a>
				</td>
				<td class="tl" title="点击查看商家任务详情">
					<a target="_blank" href="/admin/task/{{taskIdStr}}" class="view-detail">{{taskIdStr}}</a>
				</td>
				<td class="item-list">
					<div class="item-box">
						<div class="pic">
							<img src="{{itemPic}}" />
						</div>
						<p class="title">{{itemTitle}}</p>
					</div>
				</td>
				<td>{{buyerAccountNick}}<br/>{{buyerAdminNameStr}}</td>
				<td>{{orderId}}</td>
				<td>{{paidFeeStr}}</td>
				<td>{{rewardIngotStr}}</td>

				<td><i class="plat_small {{platIcon}}"></i>{{shopName}}</td>
				<td>{{sellerNick}}<br/>{{sellerAdminNameStr}}</td>
				<!-- <td>{{takeTimeStr}}</td> -->
				<td>{{modifyTimeStr}}</td>
				<td>{{statusTitle}}</td>
				<td class="item-list">
					<div class="item-box">
						<div class="pic">
							<a href="{{itemPicUrl}}" target="_black"><img src="{{itemPicUrl}}"></a>
						</div>
					</div>
				</td>
				<td><a href="javascript:;" class="stdColorButton timeOut" bid="{{taskIdStr}}" data-id="{{id}}">确认操作</a>
			</tr>
			{{/results}}
		</tbody>
	</table>
</textarea>

<!--确认操作窗口-->
<div class="popWrapper confirmWnd" id="confirmWnd">
	<div class="maskLayer"></div>
	<div class="modalWnd">
		<a href="javascript:void(0);" class="wnd_Close_Icon close" title="关闭窗口"></a>
		<h3 class="topTile">操作确认</h3>
		<div class="modalWndInner" style="width:500px">
			<div class="panelLine">
				<span class="floatLeft mr10">确认执行此操作？</span>
			</div>
		</div>
		<div class="wndBotButtonSection">
			<a id="btnConfirm" href="javascript:;" class="botButton stdColorButton">确认</a>
			<a id="btnConfirmSubtraction" href="javascript:;" class="botButton stdColorButton">确认(-5元)</a>
		</div>
	</div>
</div>
#{set 'moreScripts'}
<script src="@{'/public/javascripts/date.js'}" type="text/javascript"></script>
<script src="@{'/public/javascripts/jquery.datePicker.js'}" type="text/javascript"></script>
<script src="@{'/public/javascripts/mustache.min.js'}" type="text/javascript"></script>
<script src="@{'/public/javascripts/jquery.number.min.js'}" type="text/javascript"></script>
<script src="@{'/public/javascripts/jquery.pagination.js'}" type="text/javascript"></script>
<script src="@{'/public/javascripts/mustache.min.js'}" type="text/javascript"></script>
<script src="@{'/public/javascripts/admin/timeout.js'}" type="text/javascript"></script>
<script type="text/javascript">App.module = 'timeout';</script>
#{/set}